package com.send.config;

/**
 * Author wen
 * Date 2022-01-11
 */

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Queue;

/**
 * @classDesc: 功能描述:(创建一个队列)
 */
@Configuration
public class QueueConfig {
    @Value("${queue}")//值就是data
    private String queueName;

    @Bean
    public Queue queue() {//消息队列的名字就是data
        return new ActiveMQQueue(queueName);
    }

}